//
//  MBPageControl.m
//  MemberBusiness-ios
//
//  Created by cherry pu on 2018/5/4.
//  Copyright © 2018年 zhangXin. All rights reserved.
//

#import "MBPageControl.h"

@implementation MBPageControl

-(void)setCurrentPage:(NSInteger)currentPage
{
    [super setCurrentPage:currentPage];
    
    for (NSUInteger subviewIndex = 0; subviewIndex < [self.subviews count]; subviewIndex++) {
        UIImageView* subview = [self.subviews objectAtIndex:subviewIndex];
        
        if (subviewIndex == currentPage)
            
        {
            CGSize size;
            
            size.height = [UIView lf_sizeFromIphone6:6];
            
            size.width = [UIView lf_sizeFromIphone6:12];
            
            [subview setFrame:CGRectMake(subview.frame.origin.x, subview.frame.origin.y,size.width,size.height)];
            
        }else {
            CGSize size;
            
            size.height = [UIView lf_sizeFromIphone6:6];
            
            size.width = [UIView lf_sizeFromIphone6:6];
            
            [subview setFrame:CGRectMake(subview.frame.origin.x, subview.frame.origin.y,size.width,size.height)];
        }
        
    }
}

@end
